<%@page import="${basepackage}.app.model.*" %>
<#include "/macro.include"/> 
<#include "/custom.include"/> 
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<script>

$(".${classNameLower}").addClass("active").closest("ul").show().siblings("a").addClass("active");
</script>
	<title><fmt:message key="navigation.title.view"/> <fmt:message key="${className}.title"/></title>
	<form:form action="<@jspEl "ctx"/>/${classNameLower}/list" method="post" style="display: inline;">
	<fieldset>
		<legend><fmt:message key="navigation.title.view"/></legend>
	<#list table.columns as column>
	<#if column.pk>
		<input type="hidden" id="${column.columnNameLower}" name="${column.columnNameLower}" value="<@jspEl classNameLower+"."+column.columnNameLower/>"/>
	</#if>
	</#list>
	
		<div class="form-group">
		<#list table.columns as column>
		<#if !column.htmlHidden>
			<div class="row">	
				<div class="col-md-2 col-xs-4"><label><fmt:message key="${className}.${column.columnNameLower}.title"/></label></div>
				<div class="col-md-3 col-xs-8">
				<p class="form-control-static">
				
				<#if column.isReferenceColumn>
				<c:out value='<@jspEl classNameLower+"."+column.referenceTableLower + "." + column.referenceDisplayColumn/>'/>
				
				<#else>
				<c:out value='<@jspEl classNameLower+"."+column.columnNameLower/>'/>
				
				</#if>
				
				</p>
				</div>
			</div>
		</#if>
		</#list>
		</div>
		<div class="btn-group">
			<input type="button" value="<fmt:message key="navigation.button.backtolist"/>" class="btn btn-default" onclick="window.location='<@jspEl "ctx"/>/${classNameLower}/list'"/>
			<input type="button" value="<fmt:message key="navigation.button.back"/>" class="btn btn-info" onclick="history.back();"/>
		
		</div>
	</fieldset>
	</form:form>
